﻿using System;
using System.Security.Cryptography;//提供了MD5加密
using System.Text;
namespace md5
{
    class Program
    {
        static void Main(string[] args)
        {
            string pwd = EcvryptMD5("hello");
            System.Console.WriteLine(pwd);
        }
        public static string EcvryptMD5(string s)
        {
            MD5CryptoServiceProvider md5s = new MD5CryptoServiceProvider();
            return BitConverter.ToString(md5s.ComputeHash(Encoding.Default.GetBytes(s)));
        }
    }
}
